#ifndef DockAreaTitleBar_pH
#define DockAreaTitleBar_pH
/*******************************************************************************
** Qt Advanced Docking System
** Copyright (C) 2017 Uwe Kindler
**
** This library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public
** License as published by the Free Software Foundation; either
** version 2.1 of the License, or (at your option) any later version.
**
** This library is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
** Lesser General Public License for more details.
**
** You should have received a copy of the GNU Lesser General Public
** License along with this library; If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/


//============================================================================
/// \file   DockAreaTitleBar_p.h
/// \author Uwe Kindler
/// \date   12.10.2018
/// \brief  Declaration of classes CTitleBarButton and CSpacerWidget
//============================================================================


//============================================================================
//                                   INCLUDES
//============================================================================
#include <QFrame>

#include "ads_globals.h"

namespace ads
{



/**
 * 用于处理停靠区标题栏的鼠标事件的间隔小部件。
 * 问题在于，如果标题栏变为不可见，即如果停靠区只包含一个单独的停靠窗口，并且停靠区被移动到浮动窗口中，
 * 那么鼠标事件将不再被处理，浮动窗口的拖动也会停止。
 */
class CSpacerWidget : public QWidget
{
    Q_OBJECT
public:
    using Super = QWidget;

    /**
     * 构造函数。
     * @param Parent 父窗口。
     */
    CSpacerWidget(QWidget* Parent = nullptr);

    /**
     * 返回间隔小部件的首选大小。
     * @return 首选大小。
     */
    virtual QSize sizeHint() const override { return QSize(0, 0); }

    /**
     * 返回间隔小部件的最小大小。
     * @return 最小大小。
     */
    virtual QSize minimumSizeHint() const override { return QSize(0, 0); }
};
 // namespace ads
//-----------------------------------------------------------------------------
#endif // DockAreaTitleBar_pH
